/** @format */

import MyRequest from "./index";

/**
 *  开发进度
 *
 */
// 获取需求
export const getDemandApi = (data: any) => MyRequest.get<Response>("/demand/getDemand", data, { headers: { device: "front" } });
// 修改状态
export const editStatusApi = (data: any) => MyRequest.post("/demand/editStatus", data, { headers: { device: "front" } });

/**
 *  文档相关
 * */
// 获取知识库
export const getStoreApi = () => MyRequest.get<Response>("/docs/getStore", null, { headers: { device: "front" } });
// 获取知识库下的所有文档
export const getDocsApi = (data: any) => MyRequest.get<Response>("/docs/getDocs", data, { headers: { device: "front" } });
// 修改文档
export const editDocsApi = (data: any) => MyRequest.post<Response>("/docs/editDocs", data, { headers: { device: "front" } });
// 修改知识库
export const editStoreApi = (data: any) => MyRequest.post<Response>("/docs/editStore", data, { headers: { device: "front" } });

/**
 *  用户
 * */
export const loginApi = (data: any) => MyRequest.post<Response>("/user/login", data);
export const registApi = (data: any) => MyRequest.post<Response>("/user/regist", data);

/**
 *  日报
 * */
export const getDailyApi = () => MyRequest.get<Response>("/daily/getDaily", null, { headers: { device: "front" } });
export const getDailyByIdApi = (data: any) => MyRequest.get<Response>("/daily/getDailyById", data, { headers: { device: "front" }, responseType: "blob" });
